<template>
  <div class="boby">
    <div class="top-main">
      <h1><img src="../assets/logo.png" alt="" width="100%" height="100%" /></h1>
      <ul class="topbar">
        <li><router-link to="/">首页</router-link></li>
        <li><router-link to="/agent">房产经纪</router-link></li>
        <li><router-link to="/category">地产分类</router-link></li>
        <li><router-link to="/about" v-if="show">关于我们</router-link></li>
      </ul>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    show: {
      type: Boolean,
      required: true
    }
  },
  data() {
    return {}
  },
  created() {},
  methods: {}
}
</script>
<style lang="scss" scoped>
a {
  display: block;
  width: 100%;
  height: 100%;
  line-height: 40px;
  text-decoration: none;
  font-size: 18px;
  // color: #ccc;
}
a:link {
  color: #fff;
}
a:visited {
  color: #fff;
}
a:hover {
  color: #fff;
}
a:active {
  color: #fff;
}

// body 最外面
.boby {
  background-color: #262f3e;

  .top-main {
    margin: 0 auto;
    padding: 0;
    display: flex;
    width: 60%;
    justify-content: space-between;
    h1 {
      margin: 0;
      padding: 0;
      width: 40px;
      height: 40px;
      // background-color: antiquewhite;
      // background-image: url('../assets/logo.png');
    }
    .topbar {
      flex: 1;
      margin: 0 auto;
      padding: 0;
      list-style: none;
      display: flex;
      justify-content: space-around;
      align-items: center;
      height: 45px;
      li {
        height: 100%;
        a {
          font-size: 14px;
        }

        img {
          height: 30px;
        }
      }
      li:hover {
        background-color: rgba(255, 255, 255, 0.464);
        border-radius: 5px;
      }
    }
  }
}
</style>
